by Devin Yang
(This article was automatically translated.)

Published - 6 years ago ( Updated - 6 years ago )

CentOS 6.2 is used in this article, and the process of rebuilding curl and git is carried out.
The main reason is that the operating system is too old, and I want to directly build the latest version of git from source.
cat /etc/redhat-release
CentOS release 6.2 (Final)

But when executing the following command, an SSL connect error error occurred.
git clone https://github.com/git/git.git

Because of the old version of CentOS, the way the network provides..
yum update -y nss curl
The update method for is invalid,
So.. I re-Build curl myself.
First on another computer, clone, the latest version of curl.
git clone https://github.com/curl/curl

According to its instructions, check the GIT-INFO file, how to compile.
I execute
./buildconf
./configure
make

Just compiled curl smoothly. Then use make install to install directly.
After completion, retry the download of git repo (Note: In fact, you can go to release to download the released version)
[root@myserver src]# git clone https://github.com/git/git.git
Cloning into 'git'...
remote: Counting objects: 247464, done.
remote: Total 247464 (delta 0), reused 0 (delta 0), pack-reused 247463
Receiving objects: 100% (247464/247464), 90.42 MiB | 1.16 MiB/s, done.
Resolving deltas: 100% (182891/182891), done.
Checking connectivity... done.

Shunli cloned the source of git.
Enter the git repo folder.
According to the instructions in README.md, check the INSTALL file and how to install it.
$ make configure ;# as yourself
$ ./configure --prefix=/usr ;# as yourself
$ make all doc ;# as yourself
# make install install-doc install-html; # as root

Sure enough, step-by-step construction guarantees success. But I simply do the following actions. Hit ./configure without setting prefix.
make configure
./configure
make
make install

It's done, but I found that the suspected version is the rc1 version.
[root@myserver git]# which git
/usr/local/bin/git
[root@myserver git]# git --version
git version 2.18.0.rc1

Although it is the RC version, basically there will be no problems, it looks normal..:)
[root@myserver src]# git clone https://github.com/DevinY/dlaravel.git
Cloning into 'dlaravel'...
remote: Counting objects: 1456, done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 1456 (delta 27), resumed 42 (delta 16), pack-reused 1398
Receiving objects: 100% (1456/1456), 3.03 MiB | 948.00 KiB/s, done.
Resolving deltas: 100% (866/866), done.

After thinking about it, I rebuilt version 2.17.1 again. This time I went to the release to download it through wget, unzip it and rebuild.

simply use,
./configure
make
make install
The final screen is as follows, and version 2.17.1 is installed.
 rm -f "$execdir/$p" && \
test -z "" && \
ln "$execdir/git-remote-http" "$execdir/$p" 2>/dev/null || \
ln -s "git-remote-http" "$execdir/$p" 2>/dev/null || \
cp "$execdir/git-remote-http" "$execdir/$p" || exit; \
done && \
./check_bindir "z$bindir" "z$execdir" "$bindir/git-add"
[root@myserver git-2.17.1]# which git
/usr/local/bin/git
[root@myserver git-2.17.1]# git --version
git version 2.17.1
[root@myserver git-2.17.1]#
The above is the process of updating git in the old version of CentOS 6.2 this time.
 

Tags: linux

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


linux,docker,wifi

Use docker to build a WPA2/EAP enterprise Radius authentication server, and the backend uses a mysql database

AP provides WPA2/EAP function, but it won't work? This article introduces how I can quickly build a Radius server through docker's ubuntu:21.04 image. Related applications such as WPA2/EAP of Wifi.

linux,cli

How to use the date command to display yesterday's date

The instructions are different on MacOS or Linux, but achieve the same effect. Let's see how to display yesterday's date with the date command.

linux

Remove the Linux Kernel that is not used by the old version on Ubuntu

This page describes how I removed the old version of Linux Kernel taking up space on ubuntu.